﻿using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 修改标签请求参数
    /// </summary>
    public class UpdateTagParam
    {
        /// <summary>
        /// id
        /// </summary>
        [JsonProperty("id"), JsonPropertyName("id")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.IdIsNull))]
        public long Id { get; set; }

        /// <summary>
        /// 标签类型ID
        /// </summary>
        [JsonProperty("tagtype_id"), JsonPropertyName("tagtype_id")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.TagtypeIdIsNull))]
        public long TagtypeId { get; set; }

        /// <summary>
        /// 标签类型名称
        /// </summary>
        [JsonProperty("name"), JsonPropertyName("name")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.NameIsNull))]
        public string Name { get; set; }
    }
}
